Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/santiagodc8/tu_perfil.net/llms.txt

Use this file to discover all available pages before exploring further.

The statistics page at /admin/estadisticas gives you an overview of editorial performance and reader traffic. The data refreshes on every page load (force-dynamic).

Summary cards

Four cards at the top show site-wide totals:
CardWhat it shows
Artículos publicadosTotal published articles (not in trash).
Total de vistasCumulative page views across all articles.
Mensajes sin leerCount of unread contact form submissions.
Artículos este mesArticles created since the first of the current month.

Recent view counts

Three smaller cards show page views for specific periods:
  • Hoy — views since midnight today.
  • Ayer — views the previous full day.
  • Últimos 7 días — views over the past seven days including today.

Daily views chart (last 30 days)

A bar chart shows page views per day for the past 30 days. Hover over any bar to see the exact date and view count in a tooltip. The tallest bar represents 100% of the scale; all others are proportional.

Traffic sources

A horizontal bar chart shows where readers came from in the last 30 days. Sources are classified automatically based on the HTTP referrer header:
SourceClassification
DirectoNo referrer (direct URL, bookmarks, email clients).
GoogleReferrer matches google.*.
FacebookReferrer matches facebook.com.
Twitter/XReferrer matches twitter.com or x.com.
WhatsAppReferrer matches whatsapp.com or wa.me.
InstagramReferrer matches instagram.com.
TikTokReferrer matches tiktok.com.
TelegramReferrer matches t.me or telegram.
OtrosAny other referrer.
Each source shows the count and its percentage of total traffic for the period.

Top 10 most-read articles

A ranked list of the ten articles with the highest cumulative view count. Each item shows:
  • Rank number
  • Article title
  • Total views
  • A colored progress bar (using the article’s category color) proportional to the top article’s view count.

Articles by category

A bar chart showing how many articles (published and unpublished, excluding trash) belong to each category. The bar color matches the category color.

Articles published per month (last 6 months)

A bar chart showing how many articles were created each month over the past six months. Use this to track editorial output over time.

How views are recorded

Every time a reader opens an article on the public site, the page sends a request to POST /api/views/{article_id} with the current page referrer in the JSON body. The API:
  1. Inserts a row into page_views with article_id, viewed_at, referrer, and the classified referrer_source.
  2. Increments the views counter on the articles row using the increment_views RPC function.
All statistics data is read using the Supabase admin client (SUPABASE_SERVICE_ROLE_KEY) to bypass RLS and access aggregated data across all articles.